package com.qifei.xmlg_backend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 学生表
 * </p>
 *
 * @author qifei
 * @since 2025-06-11
 */
@ApiModel(value = "Student对象", description = "学生表")
@Data
public class Student implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 学生姓名
     */
    @ApiModelProperty("学生姓名")
    private String name;

    /**
     * 性别：1-男，2-女
     */
    @ApiModelProperty("性别：1-男，2-女")
    private Integer gender;

    /**
     * 图像
     */
    @ApiModelProperty("图像")
    private String image;

    /**
     * 出生日期
     */
    @ApiModelProperty("出生日期")
    private LocalDate birthDate;

    /**
     * 所属班级ID
     */
    @ApiModelProperty("所属班级ID")
    private Integer classId;

    /**
     * 加入班级日期
     */
    @ApiModelProperty("加入班级日期")
    private LocalDate joinDate;

    /**
     * 状态：1-在读，0-已离开
     */
    @ApiModelProperty("状态：1-在读，0-已离开")
    private Integer status;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;


    @Override
    public String toString() {
        return "Student{" +
                "id = " + id +
                ", name = " + name +
                ", gender = " + gender +
                ", birthDate = " + birthDate +
                ", classId = " + classId +
                ", joinDate = " + joinDate +
                ", status = " + status +
                ", createTime = " + createTime +
                ", updateTime = " + updateTime +
                "}";
    }
}
